#include <iostream>
#include <vector>
#include <iomanip>

class Draw {
public:
    int height;

    Draw(int h) : height(h) {}

    void drawTriangle() {
        int width = height;
        for (int i = 0; i < height; ++i) {
            for (int j = 0; j < width - i; ++j) {
                std::cout << " ";
            }
            for (int j = 0; j <= i; ++j) {
                std::cout << "*";
            }
            std::cout << std::endl;
        }
    }

    void drawRectangle() {
        int width = height * 2;
        for (int i = 0; i < height; ++i) {
            for (int j = 0; j < width; ++j) {
                if (j < height || j >= width - height) {
                    std::cout << "*";
                } else {
                    std::cout << " ";
                }
            }
            std::cout << std::endl;
        }
    }

    void drawSquare() {
        drawRectangle();
    }

    void drawParallelogram() {
        int base = height;
        int side = height * 2;
        int offset = 0;

        for (int i = 1; i < height; ++i) {
            offset += 1;
            if (offset > side - base) {
                offset = side - base;
            }
        }

        for (int i = 0; i < height; ++i) {

            for (int j = 0; j < offset - i; ++j) {
                std::cout << " ";
            }

            for (int j = 0; j < base; ++j) {
                std::cout << "*";
            }

            for (int j = 0; j < (side - base - offset + i); ++j) {
                std::cout << " ";
            }
            std::cout << std::endl;
        }
    }
};

int main() {
    Draw drawObj(5);

    std::cout << "Triangle:" << std::endl;
    drawObj.drawTriangle();
    std::cout << std::endl;

    std::cout << "Rectangle:" << std::endl;
    drawObj.drawRectangle();
    std::cout << std::endl;

    std::cout << "Square:" << std::endl;
    drawObj.drawSquare();
    std::cout << std::endl;

    std::cout << "Parallelogram:" << std::endl;
    drawObj.drawParallelogram();
    std::cout << std::endl;

    return 0;
}